﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lis.Common
{
    public static class StringHelper
    {
        /// <summary>
        /// 包含英文横杠
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public static bool CheckStr(this string s)
        {
            string c = "@/'-_()~`[]{}\"#$%&^*";
            var exist = true;
            for (int i = 0; i < c.Length - 1; i++)
            {
                if (s.Contains(c[i]))
                {
                    return false;
                }
            }
            return exist;
        }

        /// <summary>
        /// 不包含英文横杠
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public static bool NotcheckStr(this string s)
        {
            string c = "@/'_()~`[]{}\"#$%&^*";
            var exist = true;
            for (int i = 0; i < c.Length - 1; i++)
            {
                if (s.Contains(c[i]))
                {
                    return false;
                }
            }
            return exist;
        }
    }
}
